package com.vhall.component.controller.tag.facade;

import com.vhall.component.entity.tag.TagEntity;
import com.vhall.component.entity.tag.vo.*;
import com.vhall.component.plugin.common.annotation.TokenAuth;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author guoxin.wang
 * @date 2021/7/5 10:35
 */
@FeignClient(value = "TagAdminFacade", path = "/v4/tag/admin")
public interface TagAdminFacade {

    /**
     * 保存
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/save-tag")
    TagEntity save(@Validated TagCreateVO reqVO);


    /**
     * 列表
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/list")
    TagAdminPage<TagEntityVO> list(@Validated TagListVO reqVO);

    /**
     * 更新
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/edit")
    Integer update(@Validated TagUpdateVO reqVO);

    /**
     * 删除
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/delete")
    Integer delete(@Validated TagDeleteVO reqVO);

    /**
     * 详情
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/info")
    List<TagEntity> info(@Validated TagInfoVO reqVO);

    /**
     * 排序
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @TokenAuth
    @PostMapping(value = "/order")
    Boolean order(@Validated TagOrderVO reqVO);

}
